<?php
namespace app\admin\validate;

use think\Validate;

class UserRank extends Validate
{
    protected $rule = [
        'rank_name'        => 'require|unique:user_rank',
        'reg_money'        => 'number',
        'reg_integral'     => 'number',
        'day_consume'      => 'number',
        'sum_consume'      => 'number',
    ];

    protected $message = [
        'rank_name.require'        => '请输入等级名称',
        'rank_name.unique'         => '等级名称已存在',
        'reg_money.number'         => '激活金额格式错误',
        'reg_integral.number'      => '激活后赠送积分格式错误',
        'day_consume.number'       => '重消日封顶格式错误',
        'sum_consume.number'       => '重消总封顶格式错误',
    ];
}